<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
use think\facade\Route;

/**
 * 店铺管理 相关路由
 */
Route::group('shop', function () {

    /** 店铺 */
    Route::group(function () {
        //获取列表
        Route::get('index', 'v1.shop.Shop/index')->name('index')->option(['real_name' => '获取店铺列表']);
        //保存
        Route::post('save', 'v1.shop.Shop/save')->name('save')->option(['real_name' => '保存店铺']);
        //修改
        Route::post('update/:id', 'v1.shop.Shop/save')->name('update')->option(['real_name' => '修改店铺']);
        //删除
        Route::post('delete/:id', 'v1.shop.Shop/delete')->name('delete')->option(['real_name' => '删除店铺']);
    })->option(['parent' => 'shop', 'cate_name' => '店铺管理']);

})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
    \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
    \app\adminapi\middleware\AdminLogMiddleware::class
])->option(['mark' => 'shop', 'mark_name' => '店铺模块']);